<template>
  <div>
    <el-button @click="showUploadModal = true">打开上传模态框</el-button>
    <file-upload-modal
      :visible="showUploadModal"
      :students="students"
      :businessId="classId"
      :defaultMode="defaultMode"
      @update:visible="val => showUploadModal = val"
      @confirm="handleUploadConfirm"
    />
  </div>
</template>

<script>
import FileUploadModal from "@/components/FileUpload/FileUploadModal.vue";

export default {
  components: { FileUploadModal },
  data() {
    return {
      showUploadModal: false,
      defaultMode:"0",
      classId: "1001", // 业务ID（如班级ID）
      students: [
        { id: 1, name: "张三", requirements: ["身份证", "报名表"] },
        { id: 2, name: "李四", requirements: ["成绩单"] }
      ]
    };
  },
  methods: {
    handleUploadConfirm(result) {
      console.log("上传完成", result);
      // 处理上传完成后的逻辑
    }
  }
};
</script>
